package com.ag.admin.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.ag.admin.service.IPermissionService;
import com.ag.bean.TbUser;
import com.ag.lzm.dao.TbUserRoleDAO;

/**
 * 权限转移服务组件
 * @author 黎肇明
 *
 */
@Service("TransferPermissionServiceImpl")
public class PermissionServiceImpl implements IPermissionService {
	@Resource(name = "LZMTbUserRoleDAO")
	private TbUserRoleDAO userRoleDAO;

	@Override
	public void transferPermission(String roleOgn, String roleDst, TbUser user) {
//		TbUserRoleId uri = new TbUserRoleId();
//		uri.setRId(roleDst);
//		uri.setUId(user.getUId());
//		userRoleDAO.delete(userRoleDAO.findById(uri));
//		TbUserRoleId userRoleId = new TbUserRoleId();
//		userRoleId.setRId(roleDst);
//		userRoleId.setUId(user.getUId());
//		TbUserRole ur = new TbUserRole();
//		ur.setId(userRoleId);
//		userRoleDAO.save(ur);
	}

}
